from tool import get_completion
import time
text = [
"The girl with the black and white puppies have a ball.", # The girl has aball.
"Yolanda has her notebook.", # ok
"Its going to be a long day. Does the car need it’s oil changed?", # Homonyms
"Their goes my freedom. There going to bring they’re suitcases.", # Homonyms
"Your going to need you’re notebook.", # Homonyms
"That medicine effects my ability to sleep. Have you heard of the butterfly affect?", # Homonyms
"This phrase is to cherck chatGPT for spelling abilitty" # spelling
]




if __name__ == '__main__':
    for i in range(len(text)):
        time.sleep(20)
        prompt = f"""请校对并更正以下文本，注意纠正文本保持原始语种，无需输出原始文本。
        如果您没有发现任何错误，请说“未发现错误”。
        例如：
        输入：I are happy.
        输出：I am happy.
        ```{text[i]}```"""
        response = get_completion(prompt)
        print(i, response)
